home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / Commander Sets / 4D Alert / 4D Alert.rsrc / TEXT_258_4D Alert 1.0.txt < prev    next >
Encoding:
Text File  |  1994-09-14  |  3.1 KB  |  60 lines

  1. RR Alert ( resource ; message0‚Ķmessage3, type ) -> item
  2.  
  3. item        integer   returns the item number user clicked to exit the alert
  4.                     -1¬†¬†indicates external was unable to display the alert.
  5. ¬†                    1¬†¬†(should be) the OK button.
  6.  
  7. resource   longint   contains the ALRT resource number to use.
  8.  
  9. message0‚Ķmessage3   string (255)
  10.  
  11.  
  12. Whenever you use in the ALRT resource static text with the signs '^0' thru '^3' the strings (max. 255 characters) replace each of these.
  13.  
  14. You can also pass a string resource number in the same way you can use them with 4D for menus, buttons and static layout text. If message0 contains ":-16415,1" every occurence of the characters '^0' will be replaced with the contents of item 1 of STR# resource -16415 (inside the system file). When a STR# respource can't be found nothing will be displayed.
  15.  
  16. String resource -16395 in the System file contains the names of Macintosh machine types. Normally item 0 is not available, but when you use ":-16395,0" it will automatically get to the item with the name of the Macintosh you are currently using.
  17.  
  18. The system font (with most systems Chicago) will be used to display the messages.
  19.  
  20. type   integer    indicates what kind of standard icon is displayed in the 
  21.                          top-left corner:
  22. ¬†                            0¬†¬†stop icon
  23. ¬†                            1¬†¬†note icon
  24. ¬†                            2¬†¬†warning icon
  25. ¬†                            3¬†¬†no icon
  26. ¬†                 All other types are reserved and should not be used.
  27.  
  28.  
  29. When you use ALRT resources from the System file, use them at your own risk. They may not be present in earlier or future versions of the System Software. You are able to use all ALRT and STR# resources from the structure file, the 4D Application and the System file.
  30.  
  31. When you create your own ALRT resources: item 1 should always be a button (OK) and when you want, use item 2 as the Cancel button.
  32.  
  33. See also ResEdit‚Ñ¢ Reference (ResEdit version 2.1) page 53 and Inside Macintosh I page 409. And of course the Human Interface Guidelines and Human Interface Note #10 (Alert Box Guidelines).
  34.  
  35. See the 4D v3 Language Reference about using resource numbers.
  36.  
  37.  
  38. This external displays an alert window with text you put into it using ResEdit or passing text thru the external. It allows you to use different items including icons, pictures etc. When you display the same alert several times after the other the stage info is normally used. This means you can set the default button and number of sounds for each occurence withing the ALRT resource.
  39.  
  40. In comparison with using ALERT or DIALOG to display a layout:
  41.           - faster,
  42.           - select the icon you want,
  43.           - when displayed on top of a window with a selection, refreshing 
  44.                      is halted,
  45.           - access to system resources,
  46.           - auto position (System 7 only).
  47.  
  48. History:
  49. 1.0b1 (14 March 1993) First beta release.
  50.  
  51. Acknowledgements
  52. Thanks to Marco Piovanelli for his help and support regarding the Notification Mgr (not yet implemented).
  53.  
  54.  
  55. ¬© 1993-1994, Ren√© G.A. Ros
  56. Postcardware.
  57.  
  58.  
  59.  
  60.